<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改流程节点跳过条件配置')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-stepskip-edit" th:object="${wflStepskip}">
        <input name="conditionId" th:field="*{conditionId}" type="hidden">
        <input name="versionId" th:field="*{versionId}" type="hidden">
        <input name="stepId" th:field="*{stepId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">条件说明：</label>
            <div class="col-sm-8">
                <input name="conditionDesc" th:field="*{conditionDesc}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">取值SQL：</label>
            <div class="col-sm-8">
                <textarea name="valSql" class="form-control" required>[[*{valSql}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">比较类型：</label>
            <div class="col-sm-8">
                <select name="compareType" class="form-control m-b"
                        th:with="type=${@dict.getType('wflstepskip_compare_type')}" required>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{compareType}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">比较值类型：</label>
            <div class="col-sm-8">
                <select name="compareValType" class="form-control m-b"
                        th:with="type=${@dict.getType('wfl_compare_val_type')}" required>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{compareValType}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">比较值：</label>
            <div class="col-sm-8">
                <input name="compareVal" th:field="*{compareVal}" class="form-control" type="text" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "workflow/stepskip";
    $("#form-stepskip-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-stepskip-edit').serialize());
        }
    }
</script>
</body>
</html>